import pickle
import logging
import mxnet as mx
import numpy as np

with open('data.pkl', 'rb') as f:
	samples, labels = pickle.load(f)

logging.getLogger().setLevel(logging.DEBUG)
batch_size = len(labels)
labels = np.array(labels)
samples = np.array(samples)

train_iter = mx.io.NDArrayIter(samples, labels, batch_size)

model = mx.model.FeedForward.create(
	symbol = mlp,
	X = train_iter,
	num_epoch = 1000,
	learning_rate = 0.1,
	momentum = 0.99
	)

'''
model = mx.model.FeedForward(
	symbol = mlp,
	num_epoch = 1000,
	learning_rate = 0.1,
	momentum = 0.99)
'''

model.fit(X=train_iter)

print(model.predict(mx.nd.array([[0.5, 0.5]])))
